<form id="{$form.name}" name="{$form.name}">
<div style="padding-left:30px;padding-top:10px;">

<!-- wizard progress bar START -->
<div class="wizard_progress_bar">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="progress_side_start"></td>
{foreach name=steps item=view_form key=elems_name from=$form.forms}
	{assign var=current_step value=$smarty.foreach.steps.index+1}  
	{if $current_step lt $form.step}
	<td class="progress_bar progress_bar_past"><span>{$current_step}</span></td>
	{elseif $current_step eq $form.step}
	<td class="progress_bar progress_bar_current"><span>{$current_step}</span></td>
	{else}
	<td class="progress_bar progress_bar_future"><span>{$current_step}</span></td>
	{/if}
{/foreach}
<td class="progress_side_end"></td>
</tr>
<tr>
<td></td>
{foreach name=steps item=view_form key=elems_name from=$form.forms}
	{assign var=current_step value=$smarty.foreach.steps.index+1}  
	{if $current_step lt $form.step}
	<td class="past_step"><span>{$view_form->m_Text}</span></td>
	{elseif $current_step eq $form.step}
	<td class="current_step"><span>{$view_form->m_Text}</span></td>
	{else}
	<td class="future_step"><span>{$view_form->m_Text}</span></td>
	{/if}
{/foreach}
<td></td>
</tr></table>
</div>
<!-- wizard progress bar END -->

<div class="upline" style="padding-top:15px;">
	<table><tr><td>
		{if $form.icon !='' }
		<div class="form_icon"><img  src="{$form.icon}" border="0" /></div>
		{/if}
	
		<div style="float:left; width:550px;">
			<h2>
			{$form.title}
			</h2> 
			{if $form.description}
			<p class="input_row" style="line-height:20px;height:18px;">		
			<span>{$form.description}</span>
			</p>
			{else}
			<div style="height:15px;"></div>
			{/if}
		</div>
	</td></tr></table>
</div>

<div class="from_table_container">


{if $actionPanel  }	
	<div class="form_header_panel">	
		<div class="action_panel" >
			{foreach item=elem from=$actionPanel}
			    	{$elem.element}
			{/foreach}
		</div>
	</div>	
{/if}	

<!-- table start -->
<table border="0" cellpadding="0" cellspacing="0" class="form_table" id="{$form.name}_data_table">
	<thead>		
     {foreach item=cell key=elems_name from=$dataPanel.elems}	
     	{if $cell.type=='ColumnStyle'}
     		{assign var=row_style_name value=$elems_name}     	
		{else}
			{if $cell.type=='RowCheckbox'}
				{assign var=th_style value="text-align:left;padding-left:10px;"}
			{else}
				{assign var=th_style value=""}
			{/if}
         <th onmouseover="this.className='hover'" 
			onmouseout="this.className=''"
				nowrap="nowrap" style="{$th_style}"
			>{$cell.label}</th>	 
		{/if}
     {/foreach}
	</thead>
     {assign var=row_counter value=0}            
     {foreach item=row from=$dataPanel.data}
     	
     	 {if $row.$row_style_name != ''}
     	 	{assign var=row_style value=$dataPanel.data.$row_counter.$row_style_name}
     	 {else}
     	 	{assign var=row_style value=''}
     	 {/if}
     	 
         {if $row_style != ''}
		 	<tr id="{$form.name}-{$dataPanel.ids[$row_counter]}" 
					style="{$row_style}"										
					onclick="Openbiz.CallFunction('{$form.name}.SelectRecord({$dataPanel.ids[$row_counter]})');">
		 {elseif $form.currentRecordId == $dataPanel.ids[$row_counter]}  
         {assign var=default_selected_id value=$dataPanel.ids[$row_counter]}       	
			<tr id="{$form.name}-{$dataPanel.ids[$row_counter]}" 
					style="{$row_style}"
					class="selected"  normal="even" select="selected"
					onmouseover="if(this.className!='selected')this.className='hover'" 
					onmouseout="if(this.className!='selected')this.className='even'" 
					onclick="Openbiz.CallFunction('{$form.name}.SelectRecord({$dataPanel.ids[$row_counter]})');">
         {elseif $row_counter == 0 and $form.currentRecordId == ""}
         {assign var=default_selected_id value=$dataPanel.ids[$row_counter]}    
			<tr id="{$form.name}-{$dataPanel.ids[$row_counter]}" 
					style="{$row_style}"
					class="selected"  normal="even" select="selected"
					onmouseover="if(this.className!='selected')this.className='hover'" 
					onmouseout="if(this.className!='selected')this.className='even'" 
					onclick="Openbiz.CallFunction('{$form.name}.SelectRecord({$dataPanel.ids[$row_counter]})');">
          {elseif $row_counter is odd}
		   <tr id="{$form.name}-{$dataPanel.ids[$row_counter]}" 
		   			style="{$row_style}"
		   			class="odd"  normal="odd" select="selected"
					onmouseover="if(this.className!='selected')this.className='hover'" 
					onmouseout="if(this.className!='selected')this.className='odd'"  
					onclick="Openbiz.CallFunction('{$form.name}.SelectRecord({$dataPanel.ids[$row_counter]})');">
         {else}
			<tr id="{$form.name}-{$dataPanel.ids[$row_counter]}" 
					style="{$row_style}"
					class="even"  normal="even" select="selected"
					onmouseover="if(this.className!='selected')this.className='hover'" 
					onmouseout="if(this.className!='selected')this.className='even'" 
					onclick="Openbiz.CallFunction('{$form.name}.SelectRecord({$dataPanel.ids[$row_counter]})');">
         {/if}
         
         {assign var=col_counter value=0}    
         {foreach key=name item=cell key=cell_name from=$row}
         	{if $col_counter eq 0}
         		{assign var=col_class value=' class="row_header" '}    
         	{else}
         		{assign var=col_class value=' '}
         	{/if}
         	{if $cell_name != $row_style_name}
	            {if $cell != ''}            	
	              <td {$col_class} style="{$row_style}" nowrap="nowrap" >{$cell}</td>
	            {else}
	              <td {$col_class} style="{$row_style}" nowrap="nowrap" >&nbsp;</td>
	            {/if}
            {/if}
            {assign var=col_counter value=$col_counter+1}
         {/foreach}
                  
		{assign var=row_counter value=$row_counter+1}
		</tr>
     {/foreach}
  
							
</table>
</div>
	
		
<!-- table end -->	

	<div class="form_footer_panel" >
		<div class="ajax_indicator" style="width:150px;">
			<div id='{$form.name}.load_disp' style="display:none" >
				<img src="{$image_url}/form_ajax_loader.gif"/>
			</div>
		</div>
		<div class="navi_panel">
{if $navPanel}
   {foreach item=elem from=$navPanel}
   		{if $elem.label} <label style="width:68px;">{$elem.label}</label>{/if}
    	{$elem.element}
   {/foreach}
{/if}			
		</div>		
	</div>

{if $wizardPanel  }	
	<div class="" style="height:30px;padding-top:10px;">	
			{foreach item=elem from=$wizardPanel}
			    	{$elem.element}
			{/foreach}
	</div>	
{/if}	

<span id='{$form.name}_selected_id' style="display:none">{$default_selected_id}</span>

			
	<div class="v_spacer"></div>
	{if $errors}
	    <div id='errorsDiv' class='innerError errorBox'>
	    {foreach item=errMsg from=$errors}
	        <div>{$errMsg}</div>
	    {/foreach}
	    {literal}<script>try{setTimeout("$('errorsDiv').fade( {from: 1, to: 0});",3000);}catch(e){}</script>{/literal}
	    </div>
	    <div class="v_spacer"></div>
	{/if}
	
	{if $notices}
	    <div id='noticeDiv' class='noticeBox' >
	    {foreach item=noticeMsg from=$notices}
	        <div>{$noticeMsg}</div>
	    {/foreach}
	    </div>
	    {literal}<script>try{setTimeout("$('noticeDiv').fade( {from: 1, to: 0});",3000);}catch(e){};</script>{/literal}
	    <div class="v_spacer"></div>
	{/if}
	
</div>

</form>